//Schema是类,model是对象
const {Schema,model} = require('mongoose');

/**
 * 创建表头
 * versionKey:false 表中不要加版本号
 */
const orderSchema = new Schema({
    id: String,
    movieId: String,
    opearId: String,
    seats: Array,
    code: String,
    orderNo: String,
    time:String,
    state: String
},{versionKey:false})

//参数一:模型名  参数二:Schema表结构 参数三:表名
module.exports = model("OrderModel_DB",orderSchema,"orders")